import traceback
from sendmsg import *

# tdx dll插件数据文件路径
tdx_path = r'D:\TDX.txt'


def tdx():
    """监控tdx dll插件输出内容"""

    try:

        # 读取文件内容
        fo = open(tdx_path, "r")
        listOfLines = fo.readlines()
        fo.close()
        fo = open(tdx_path, 'w')
        fo.close()

        # 处理
        for line in listOfLines:
            l = line.split('|')
            print(l[0], l[1], l[2])

    except:
        traceback.print_exc()


if __name__ == '__main__':
    tdx()
